#ifndef D_DRAWBASEELEMENT_H
#define D_DRAWBASEELEMENT_H

#include <wx/gdicmn.h>
#include "..\D-DrawTypes.h"

class wxClientDC;
class wxDC;
class wxPoint;
class wxSize;

class D_DrawBaseElement{
	public:
	D_DrawBaseElement(){
		m_element_type = ElementType_other;
		}
		
	virtual ~D_DrawBaseElement(){
		
		}
			
	virtual ElementType GetType(){
		return m_element_type;
		}
		
	virtual unsigned char* ToByteBuffer(int& buffer_length){
		buffer_length = 0;
		return 0x0;
		}
		
	virtual void FromByteBuffer(unsigned char* buffer, int buffer_length){
		}
		
	virtual void SetZBuffer(int depth) = 0;
	virtual int GetZBuffer() = 0;
	virtual int GetZBufferForDrawing(){
		return GetZBuffer();
		}
	virtual wxPoint* GetPosition() = 0;
	virtual void SetPosition(wxPoint position) = 0;
	virtual wxSize* GetSize() = 0;
	virtual void SetSize(wxSize size) = 0;
		
	virtual void Render(wxDC* dc, wxPoint* offset) = 0;
	virtual D_DrawBaseElement* Clone() = 0;
	virtual wxPoint* EncapsulatePoint(wxPoint* point){
		return point;
		}
	
	static const int m_max_z_level = 16;
	
	protected:
	ElementType m_element_type;
	wxPoint m_position;
	wxSize m_size;
	int m_z_level;
	};
#endif